package com.ruoyi.serve.controller;

import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.serve.domain.VerFreeDesign;
import com.ruoyi.serve.service.IVerFreeDesignService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

/**
 * 免费设计服务Controller
 *
 * @author ruoyi
 * @date 2025-09-10
 */
@RestController
@RequestMapping("/serve/design")
@Tag(name = "免费设计服务接口", description = "提供免费设计服务操作")
public class VerFreeDesignController extends BaseController {
    @Autowired
    private IVerFreeDesignService verFreeDesignService;


    /**
     * 新增免费设计服务
     */
    @PreAuthorize("@ss.hasPermi('serve:design:add')")
    @Operation(summary = "新增免费设计服务", description = "传入免费设计服务对象，返回新增结果")
    @Log(title = "免费设计服务", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody VerFreeDesign verFreeDesign) {
        return toAjax(verFreeDesignService.insertVerFreeDesign(verFreeDesign));
    }



}
